<template>
  <div class="fillcontain">
    <div class="box flex-between">
      <h3>车库车道管理</h3>
      <el-button size="small">添加</el-button>
    </div>
    <div class="box-garagre">
      <div class="box garage">
        <h2>车库001</h2>
        <el-button type="primary" size="small">进入车库</el-button>
      </div>
      <div class="box garage">
        <h2>车库002</h2>
        <el-button type="primary" size="small">进入车库</el-button>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  data() {
    return {
      search: {
        phone: ""
      },
      inTime: "",
      outTime: "",
      currentRow: 10,
      offset: 0,
      limit: 10,
      count: 0,
      currentPage: 1
    };
  },
  components: {},
  created() {
    // this.initData();
  },
  methods: {
    // async initData(){
    //     try{
    //         const countData = await getUserCount();
    //         if (countData.status == 1) {
    //             this.count = countData.count;
    //         }else{
    //             throw new Error('获取数据失败');
    //         }
    //         this.getUsers();
    //     }catch(err){
    //         console.log('获取数据失败', err);
    //     }
    // },
    handleClick(row) {
      console.log(row);
    },
    handleSizeChange(val) {
      console.log(`每页 ${val} 条`);
    },
    handleCurrentChange(val) {
      this.currentPage = val;
      this.offset = (val - 1) * this.limit;
      // this.getUsers()
    }
    // async getUsers(){
    //     const Users = await getUserList({offset: this.offset, limit: this.limit});
    //     this.tableData = [];
    //     Users.forEach(item => {
    //         const tableData = {};
    //         tableData.username = item.username;
    //         tableData.registe_time = item.registe_time;
    //         tableData.city = item.city;
    //         this.tableData.push(tableData);
    //     })
    // }
  }
};
</script>

<style lang="less">
// @import url("../style/mixin.less");
@import url("../style/main.less");
.box-garagre {
  display: flex;
}
.box.garage {
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  align-items: center;
  height: 300px;
  width: 400px;
  margin: 0 20px 20px 0;
}
</style>
